home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d26 / matlab.arc / HELPSET.FOR < prev    next >
Text File  |  1990-09-23  |  621b  |  23 lines

  1.       PROGRAM HLPSET
  2. C
  3.       CHARACTER*66 LINE
  4.       OPEN(UNIT=9,FILE='HELP',ACCESS='SEQUENTIAL',STATUS='OLD')
  5.       OPEN(UNIT=1,FILE='MATHELP.DAC',
  6.      .     STATUS='NEW',ACCESS='DIRECT',RECL=66)
  7.       OPEN(UNIT=2,FILE='MATHELP.IDX',
  8.      .     STATUS='NEW',ACCESS='DIRECT',RECL=8)
  9.       REWIND 9
  10.       N = 0
  11.       K = 0
  12.    10 READ(9,12,END=20) LINE
  13.    12 FORMAT(A66)
  14.       N = N + 1
  15.       WRITE(1,REC=N) LINE
  16.       IF (LINE(1:4) .NE. '    ') THEN
  17.          K = K + 1
  18.          WRITE(2,REC=K) LINE(1:4),N
  19.       ENDIF
  20.       IF (LINE(1:4) .NE. 'EOF ') GO TO 10
  21.    20 CLOSE(1)
  22.       CLOSE(2)
  23.       END